package com.example.zhiran.mapper;

import com.example.zhiran.pojo.orm.ZRUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ZRUserMapper {
    ZRUser getUserById(String zrId);

    //todo 中文索引
    ZRUser getUserByName(String zrNickname);

    ZRUser getUserByTel(String zrTelephone);

    List<ZRUser> getUsersByNameAndTel(@Param("zrTelephone") String zrTelephone, @Param("zrNickname") String zrNickname);


    int getUserCount();

    int addUser(ZRUser zrUser);

    int updateUser(ZRUser zrUser);

    int updateUserNickname(String zrId,String zrNickname);

    //todo 修改手机号码
    int updateUserTelephone(String zrId,String zrTelephone);

    int updateUserLevel(String zrId,String zrLevel);

    int updateUserBeans(String zrId,String zrBeans);

    int deleteUser(String  zrId);

}
